package bn.mq.interfaz;

public class ServiceReniecProxy implements bn.mq.interfaz.ServiceReniec {
  private boolean _useJNDI = true;
  private String _endpoint = null;
  private bn.mq.interfaz.ServiceReniec serviceReniec = null;
  
  public ServiceReniecProxy() {
    _initServiceReniecProxy();
  }
  
  private void _initServiceReniecProxy() {
  
  if (_useJNDI) {
    try{
      javax.naming.InitialContext ctx = new javax.naming.InitialContext();
      serviceReniec = ((bn.mq.interfaz.ServiceReniecService)ctx.lookup("java:comp/env/service/ServiceReniecService")).getServiceReniec();
      }
    catch (javax.naming.NamingException namingException) {}
    catch (javax.xml.rpc.ServiceException serviceException) {}
  }
  if (serviceReniec == null) {
    try{
      serviceReniec = (new bn.mq.interfaz.ServiceReniecServiceLocator()).getServiceReniec();
      }
    catch (javax.xml.rpc.ServiceException serviceException) {}
  }
  if (serviceReniec != null) {
    if (_endpoint != null)
      ((javax.xml.rpc.Stub)serviceReniec)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
    else
      _endpoint = (String)((javax.xml.rpc.Stub)serviceReniec)._getProperty("javax.xml.rpc.service.endpoint.address");
  }
  
}


public void useJNDI(boolean useJNDI) {
  _useJNDI = useJNDI;
  serviceReniec = null;
  
}

public String getEndpoint() {
  return _endpoint;
}

public void setEndpoint(String endpoint) {
  _endpoint = endpoint;
  if (serviceReniec != null)
    ((javax.xml.rpc.Stub)serviceReniec)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
  
}

public bn.mq.interfaz.ServiceReniec getServiceReniec() {
  if (serviceReniec == null)
    _initServiceReniecProxy();
  return serviceReniec;
}

public bn.mq.bean.Firma consulta4(java.lang.String sistema, java.lang.String usrapp, java.lang.String claveapp, java.lang.String user, java.lang.String dni) throws java.rmi.RemoteException{
  if (serviceReniec == null)
    _initServiceReniecProxy();
  return serviceReniec.consulta4(sistema, usrapp, claveapp, user, dni);
}

public bn.mq.bean.IdentidadInfo consulta1(java.lang.String sistema, java.lang.String usrapp, java.lang.String claveapp, java.lang.String user, int numReg, int initGroup, java.lang.String apePat, java.lang.String apeMat, java.lang.String nombre) throws java.rmi.RemoteException{
  if (serviceReniec == null)
    _initServiceReniecProxy();
  return serviceReniec.consulta1(sistema, usrapp, claveapp, user, numReg, initGroup, apePat, apeMat, nombre);
}

public bn.mq.bean.Identidad consulta7(java.lang.String sistema, java.lang.String usrapp, java.lang.String claveapp, java.lang.String user, java.lang.String dni) throws java.rmi.RemoteException{
  if (serviceReniec == null)
    _initServiceReniecProxy();
  return serviceReniec.consulta7(sistema, usrapp, claveapp, user, dni);
}

public bn.mq.bean.Foto consulta3(java.lang.String sistema, java.lang.String usrapp, java.lang.String claveapp, java.lang.String user, java.lang.String dni) throws java.rmi.RemoteException{
  if (serviceReniec == null)
    _initServiceReniecProxy();
  return serviceReniec.consulta3(sistema, usrapp, claveapp, user, dni);
}

public bn.mq.bean.IdentidadHuman consulta2(java.lang.String sistema, java.lang.String usrapp, java.lang.String claveapp, java.lang.String user, java.lang.String dni) throws java.rmi.RemoteException{
  if (serviceReniec == null)
    _initServiceReniecProxy();
  return serviceReniec.consulta2(sistema, usrapp, claveapp, user, dni);
}


}